package com.ccz.demo.design.proxy.demo1.staticproxy;

/**
 * @ClassName ProxyLawer
 * @Author caihaoyun
 * @Date 2020/4/13
 * @Version V1.0
 * 代理律师诉讼类，实现ILawSuit接口
 **/
public class ProxyLawyer implements ILawSuit {

    ILawSuit plaintiff; // 持有要代理的对象

    public ProxyLawyer(ILawSuit plaintiff) {
        this.plaintiff = plaintiff;
    }

    @Override
    public void submit(String proof) {
        plaintiff.submit(proof);
    }

    @Override
    public void defend() {
        plaintiff.defend();
    }
}
